package com.example.androidstart.view;

import static com.example.androidstart.util.MotionEventUtils.getMotionEventName;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;


import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class CustomizeTextView extends androidx.appcompat.widget.AppCompatTextView {
    private static final String TAG = "CustomizeTextView";

    public CustomizeTextView(@NonNull Context context) {
        super(context);
    }

    public CustomizeTextView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomizeTextView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.i(TAG, "onTouchEvent: " + getMotionEventName(event));
        return super.onTouchEvent(event);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.i(TAG, "dispatchTouchEvent: " + getMotionEventName(event));
        return super.dispatchTouchEvent(event);
    }
}
